DOCKER_USERNAME=conversation-web-chat
DEV_IMAGE_NAME=registry.cn-hangzhou.aliyuncs.com/slef-dev-project/$(DOCKER_USERNAME)
PRODUCTION_IMG_NAME=registry.cn-hangzhou.aliyuncs.com/slef-production-project/$(DOCKER_USERNAME)
DEV_VERSION=20250622008
PRODUCTION_VERSION=20250622003

.PHONY: publish-dev build-dev tag-dev push-dev publish-release build-release tag-release push-release clean

publish-dev: build-dev tag-dev push-dev

build-dev:
	docker buildx build --build-arg ENV=uat -t $(DEV_IMAGE_NAME) .

tag-dev:
	docker tag $(DEV_IMAGE_NAME) $(DEV_IMAGE_NAME):$(DEV_VERSION)

push-dev:
	docker push $(DEV_IMAGE_NAME):$(DEV_VERSION)

publish-release: build-release tag-release push-release

build-release:
	docker buildx build --build-arg ENV=prd -t $(PRODUCTION_IMG_NAME) .

tag-release:
	docker tag $(PRODUCTION_IMG_NAME) $(PRODUCTION_IMG_NAME):$(PRODUCTION_VERSION)

push-release:
	docker push $(PRODUCTION_IMG_NAME):$(PRODUCTION_VERSION)

